all_classes = 'https://scikit-learn.org/stable/modules/classes.html'
head_url = 'https://scikit-learn.org/stable/modules/generated/'

links = {
    'knn': 'sklearn.neighbors.KNeighborsClassifier.html',
    'linear': 'sklearn.linear_model.LinearRegression.html',
    'ridge': 'sklearn.linear_model.Ridge.html',
    'lasso': 'sklearn.linear_model.Lasso.html',
    'logistic': 'sklearn.linear_model.LogisticRegression.html',
    'decisiontree': 'sklearn.tree.DecisionTreeClassifier.html',
    'randomforest': 'sklearn.ensemble.RandomForestClassifier.html',
    'gbdt': 'sklearn.ensemble.GradientBoostingClassifier.html',
    'svm': 'sklearn.svm.LinearSVC.html',
    'mlp': 'sklearn.neural_network.MLPClassifier.html'
}


def get_url(key):
    if key in links:
        return head_url+links[key]
    else:
        return all_classes


if __name__ == '__main__':
    import webbrowser
    webbrowser.open_new_tab(get_url('knn'))
